package org.bee.check.models;

import org.bee.check.Length;
import org.bee.check.NotNull;
import org.bee.check.Regex;

/**
 * 综合测试实体类
 */
public class User {
    @NotNull
    @Length(min = 1, max = 6, msg = "姓名长度必须在1-6之间")
    @Regex(value = "[a-z]+",msg = "用户名必须是小写的英文")
    private String name;

    @NotNull
    @Length(min = 5, max = 9, msg = "密码长度必须在5-9位之间")
    @Regex(value = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()\\-_=+{};:,<.>]).+$",msg = "密码必须包含特殊字符以及大小写字母")
    private String password;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
